<template>
    <div class="footer-bottom">
        <div class="accept-switch">
            自动接受对局<el-switch v-model="readyValue" active-color="#13ce66" inactive-color="#ff4949" @change="readyChange">
            </el-switch>
        </div>
        <div class="state">客户端状态:{{ state }}</div>
    </div>
</template>

<script>
import { mapMutations } from "vuex";
export default {
    name: "FooterBottom",
    data() {
        return {
            readyValue: true,
            state: '已连接',

        }
    },
    methods: {
        ...mapMutations(['setStoreReadyValue']),
        async readyChange() {
            this.setStoreReadyValue(this.readyValue)
        }
    }
}
</script>

<style lang="scss">
@import '../assets/common.scss';

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 3px 20px 0 40px;
    width: 100%;
    height: 30px;
    background-color: $t-b-color;
    border-radius: 0 0 10px 0;
    box-sizing: border-box;

    .state {
        color: $text-color;
        font-weight: 600;
        font-size: 16px;
    }

    .accept-switch {
        color: $text-color;
        font-weight: 600;
        font-size: 16px;

        .el-switch {
            margin-left: 10px;
        }
    }

}
</style>